package test2;

import java.io.IOException;
import java.util.Scanner;
import java.util.TreeMap;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: ling
 * Date: 2022-04-22
 * Time: 22:15
 */
public class Main {
    public static int menu(){
        System.out.println("1.数据录入");
        System.out.println("2.从文件中读取学生信息");
        System.out.println("3.将学生信息写入文件中");
        System.out.println("0.退出系统");
        System.out.println("请选择>:");
        Scanner scanner=new Scanner(System.in);
        int index=scanner.nextInt();
        return index;
    }
    public static void main(String[] args) throws IOException {
        Student student=new Student();
        TreeMap<String,Student> treeMap=new TreeMap<>();
        while (true){
            int choice=menu();
            student.doOperation(choice,treeMap);
        }
    }
}
